#include "tcp.h"
#include "head.h"
#include "handle.h"
/* Useage:  */

int main(int argc,char*argv[]){
    //初始化网络
    int client_fd = tcpInit();
    //读取缓存区
    char input[BUF_SIZE] = {0};

    Client client;
    client.login = false;

    while(1){
        //判断登录状态
        if(client.login == false){
            userLogin(&client);
        }
        //清空缓存区
        memset(input, 0, BUF_SIZE);
        //读取标准输入
        fgets(input, BUF_SIZE, stdin);
        //分析指令
        handle(input);
    }

    close(client_fd);
    return 0;
}

